package me.bincker.formwork.web.core.entity

import me.bincker.formwork.web.modules.system.entity.User
import org.springframework.data.annotation.CreatedBy
import org.springframework.data.annotation.LastModifiedBy
import javax.persistence.ManyToOne
import javax.persistence.MappedSuperclass

/**
 * 可溯源的实体
 */
@MappedSuperclass
open class TraceableEntity: BaseEntity() {
    @CreatedBy
    @ManyToOne
    var createdBy: User? = null

    @LastModifiedBy
    @ManyToOne
    var lastModifiedBy: User? = null
}